writing a rule from an input output table